a<-visNetwork(nodes, edges, width = "90%") %>%
visOptions(highlightNearest = TRUE, nodesIdSelection = TRUE) %>%
#visNodes(shape = "square") %>% # square for all nodes
visEdges(arrows ="to") %>% # arrow "to" for all edges
visGroups(groupname = "regla") %>% # darkblue for group "A"
visGroups(groupname = "Condicion",shape = "icon",icon = list(code = "f007", color = "pink"), color = "red")
visExport(graph= a,type = "png", name = "network",
label = paste0("Export as png"), background = "#fff",
float = "left", style = NULL, loadDependencies = TRUE)